﻿using ShanNiang.Service.Enumerate;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShanNiang.Service
{
    public class ScanSoundsConfig
    {
        public ScanSoundsConfig()
        {
            ErrorSounds = new Dictionary<CodeType, string> {
                { CodeType.Unknown, "scan_err.wav" },
                { CodeType.Barcode,"bar_err.wav" },
                { CodeType.BottleCode, "bottle_err.wav" }, 
                { CodeType.BoxCode, "box_err.wav" } ,
                { CodeType.PalletCode, "pallet_err.wav" } ,
            };
            InfoSounds = new Dictionary<CodeType, string> {
                { CodeType.Unknown, "scan_inf.wav" },
                { CodeType.Barcode,"bar_inf.wav" },
                { CodeType.BottleCode, "bottle_inf.wav" },
                { CodeType.BoxCode, "box_inf.wav" } ,
                { CodeType.PalletCode, "pallet_inf.wav" } ,
            };
            SuccessSounds = new Dictionary<CodeType, string> {
                { CodeType.Unknown, "scan_suc.wav" },
                { CodeType.Barcode,"bar_suc.wav" },
                { CodeType.BottleCode, "bottle_suc.wav" },
                { CodeType.BoxCode, "box_suc.wav" } ,
                { CodeType.PalletCode, "pallet_suc.wav" } ,
            };
            WanningSounds = new Dictionary<CodeType, string> {
                { CodeType.Unknown, "scan_wan.wav" },
                { CodeType.Barcode,"bar_wan.wav" },
                { CodeType.BottleCode, "bottle_wan.wav" },
                { CodeType.BoxCode, "box_wan.wav" } ,
                { CodeType.PalletCode, "pallet_wan.wav" } ,
            };

        }
        /// <summary>
        /// 报错声
        /// </summary>
        public Dictionary<CodeType,string> ErrorSounds { get; set; }
        /// <summary>
        /// 消息声
        /// </summary>
        public Dictionary<CodeType, string> InfoSounds { get; set; }
        /// <summary>
        /// 成功声
        /// </summary>
        public Dictionary<CodeType, string> SuccessSounds { get; set; }
        /// <summary>
        /// 警告声
        /// </summary>
        public Dictionary<CodeType, string> WanningSounds { get; set; }
        
        /// <summary>
        /// 关闭所有声音
        /// </summary>
        public bool TurnOffAllSounds { get; set; }
    }


}
